﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;

namespace WinFormSample
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void txtBoxInput_TextChanged(object sender, EventArgs e)
        {
            labelInput.Text = txtBoxInput.Text;
            statusLabel.Text = txtBoxInput.Text;
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void cbAllowReset_CheckedChanged(object sender, EventArgs e)
        {
            resetMenuItem.Enabled = cbAllowReset.Checked;
        }

        private void resetMenuItem_Click(object sender, EventArgs e)
        {
            txtBoxInput.Text = "";
        }
    }
}
